var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
    })(e, t);
}, function(e, t) {
    function n() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, 
    new n());
}), a = this && this.__decorate || function(e, t, o, n) {
    var c, i = arguments.length, s = i < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(e, t, o, n); else for (var r = e.length - 1; 0 <= r; r--) (c = e[r]) && (s = (i < 3 ? c(s) : 3 < i ? c(t, o, s) : c(t, o)) || s);
    return 3 < i && s && Object.defineProperty(t, o, s), s;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("PrefabView"), s = e("AudioManager"), c = e("GameData"), l = e("UIManager"), d = e("WebManager"), u = cc._decorator, p = u.ccclass, h = u.property, f = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.sound = null, e.effect = null, e.vibrate = null, e;
    }
    return i(e, t), e.prototype.onClickBack = function() {
        s.default.getInstance().playAudio("按钮2"), d.default.getInstance().sentLog("点击设置界面返回按键"), 
        l.default.getInstance().showPnl("start"), this.hidePnl();
    }, e.prototype.onClickSound = function() {
        s.default.getInstance().playAudio("按钮2"), c.GD.isSound ? (c.GD.isSound = 0, this.sound.toggleItems[1].isChecked = !0) : (c.GD.isSound = 1, 
        this.sound.toggleItems[0].isChecked = !0);
    }, e.prototype.onClickEffect = function() {
        s.default.getInstance().playAudio("按钮2"), c.GD.isEffect ? (c.GD.isEffect = 0, this.effect.toggleItems[1].isChecked = !0) : (c.GD.isEffect = 1, 
        this.effect.toggleItems[0].isChecked = !0);
    }, e.prototype.onClickVibrate = function() {
        s.default.getInstance().playAudio("按钮2"), c.GD.isVibrate ? (c.GD.isVibrate = 0, 
        this.vibrate.toggleItems[1].isChecked = !0) : (c.GD.isVibrate = 1, this.vibrate.toggleItems[0].isChecked = !0);
    }, e.prototype.start = function() {
        var o = this;
        c.GD.isSound ? this.sound.toggleItems[0].isChecked = !0 : this.sound.toggleItems[1].isChecked = !0, 
        c.GD.isEffect ? this.effect.toggleItems[0].isChecked = !0 : this.effect.toggleItems[1].isChecked = !0, 
        c.GD.isVibrate ? this.vibrate.toggleItems[0].isChecked = !0 : this.vibrate.toggleItems[1].isChecked = !0, 
        this.sound.toggleItems.forEach(function(e) {
            var t = new cc.Component.EventHandler();
            t.target = o.node, t.component = "SetView", t.handler = "onClickSound", e.checkEvents.push(t);
        }), this.effect.toggleItems.forEach(function(e) {
            var t = new cc.Component.EventHandler();
            t.target = o.node, t.component = "SetView", t.handler = "onClickEffect", e.checkEvents.push(t);
        }), this.vibrate.toggleItems.forEach(function(e) {
            var t = new cc.Component.EventHandler();
            t.target = o.node, t.component = "SetView", t.handler = "onClickVibrate", e.checkEvents.push(t);
        });
    }, a([ h(cc.ToggleContainer) ], e.prototype, "sound", void 0), a([ h(cc.ToggleContainer) ], e.prototype, "effect", void 0), 
    a([ h(cc.ToggleContainer) ], e.prototype, "vibrate", void 0), a([ p ], e);
}(r.default);

n.default = f;